<template>
    <Card class="body">
        <div id="baidumap" class="baiduMap"></div>
    </Card>
</template>
<style>
    .body {
        width: 600px;
        height: 800px;
    }

    .baiduMap {
        width: 400px;
        height: 500px;
    }
</style>
<script>
    import Card from "../../../node_modules/iview/src/components/card/card.vue";

    export default {
        components: {Card},
        data() {
            return {}
        },
        mounted() {
            // 百度地图API功能
            // 创建Map实例
            var map = new BMap.Map("baidumap");
            //设置中心点坐标
            var point = new BMap.Point(116.404, 39.915);
            //地图初始化
            map.centerAndZoom(point,20);
            map.enableScrollWheelZoom(true);
        }
    }
</script>